package com.inews.business.service;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Pageable;

import com.inews.base.security.vo.BaseUserVo;
import com.inews.base.vo.ExtData;
import com.inews.business.vo.RoleResourceTreeVo;
import com.inews.business.vo.SysRoleVo;

public interface SysRoleService {
	
	/**
	 * 分页查询系统角色.
	 *
	 * @param filterParams the filter params
	 * @param page the page
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> findSysRolePage(Map<String, Object> filterParams, Pageable page);
	
	
	/**
	 * 查询系统角色.
	 *
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> findSysRoleAll();
	
	
	
	/**
	 * 保存用户角色.
	 *
	 * @param vo the vo
	 * @param user the user
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> saveSysRole(SysRoleVo vo, BaseUserVo user);
	
	
	
	/**
	 * 更新角色信息.
	 *
	 * @param vo the vo
	 * @param user the user
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> updateSysRole(SysRoleVo vo, BaseUserVo user);
	
	
	
	/**
	 * 删除角色信息.
	 *
	 * @param vo the vo
	 * @param user the user
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> deleteSysRole(SysRoleVo vo, BaseUserVo user);
	
	
	
	/**
	 * 根据角色查找对应权限.
	 *
	 * @param vo the vo
	 * @return the ext data
	 */
	public ExtData<RoleResourceTreeVo> findRoleResource(SysRoleVo vo);
	
	
	
	/**
	 * 分配权限.
	 *
	 * @param vo the vo
	 * @param roleResourceVos the role resource vos
	 * @param user the user
	 * @return the ext data
	 */
	public ExtData<SysRoleVo> chooseResource(SysRoleVo vo, List<RoleResourceTreeVo> roleResourceVos, BaseUserVo user);
	

}
